package com.gateway.sync.data.api;


import com.gateway.common.dto.sync.RouteFilterSyncData;
import com.gateway.common.dto.sync.RoutePredicateSyncData;
import com.gateway.common.dto.sync.RouteSyncData;

import java.util.List;

/**
 * @program: ahcloud-gateway
 * @description:
 * @author: YuKai Fan
 * @create: 2023/5/29 19:21
 **/
public interface RouteDataSubscriber {

    /**
     * On subscribe.
     * @param routeSyncData
     */
    void onSubscribe(RouteSyncData routeSyncData);

    /**
     * Un subscribe.
     * @param routeSyncData
     */
    void unSubscribe(RouteSyncData routeSyncData);

    default void onSubscribeFilter(RouteFilterSyncData routeFilterSyncData) {

    }

    default void onSubscribePredicate(RoutePredicateSyncData routePredicateSyncData) {

    }

    default void unSubscribeFilter(RouteFilterSyncData routeFilterSyncData) {

    }

    default void unSubscribePredicate(RoutePredicateSyncData routePredicateSyncData) {

    }

    /**
     * Refresh
     */
    default void refresh() {

    }

    /**
     * Refresh
     */
    default void refreshFilter() {

    }


    /**
     * Refresh
     */
    default void refreshPredicate() {

    }
}
